﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <title>TrafficLight: Light.h Source File</title>
    <link href="/Content/Help.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/tabs.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="header">
        <img id="logo" alt="StateForge" src="/Content/Images/StateForgeLogo.png" />
        <div id="title">
            <h1>
                Examples using state machines generated by StateBuilderCpp
            </h1>
            <h3>
                TrafficLight: Light.h Source File
            </h3>
        </div>
        <div id="menucontainer">
            <ul id="menu">
                <li><a href="/">Home</a></li>
                <li><a href="/Home/Download">Downloads</a></li>
                <li><a href="/Help/state-machine-tools.aspx">Help</a></li>
                <li><a href="/Home/Faq">F.A.Q</a></li>
                <li><a href="/Home/About">Contact us</a></li>
            </ul>
        </div>
    </div>
<!-- Generated by Doxygen 1.7.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">Light.h</div>  </div>
</div>
<div class="contents">
<a href="_light_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef LIGHT_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define LIGHT_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;QtCore/QObject&gt;</span>
<a name="l00005"></a>00005 
<a name="l00006"></a><a class="code" href="class_light.html">00006</a> <span class="keyword">class </span><a class="code" href="class_light.html">Light</a> : <span class="keyword">public</span> QObject
<a name="l00007"></a>00007 {
<a name="l00008"></a>00008     Q_OBJECT
<a name="l00009"></a>00009 <span class="keyword">public</span>:
<a name="l00010"></a>00010     <a class="code" href="class_light.html#aeb5df09a25a32f19fdffa761268ba24f">Light</a>(); 
<a name="l00011"></a>00011     <span class="keyword">virtual</span> <a class="code" href="class_light.html#ad0e59fad13bb6cfadc25b2c477e9ddc7">~Light</a>();
<a name="l00012"></a>00012 
<a name="l00013"></a><a class="code" href="class_light.html#a169c90d989c1d0563e105d96f0bc38e5">00013</a>     <span class="keywordtype">long</span> <a class="code" href="class_light.html#a169c90d989c1d0563e105d96f0bc38e5">getRedDuration</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_light.html#a14e9185e36c62bb9cc5815d48bdaa94a">m_lRedDuration</a>;}
<a name="l00014"></a><a class="code" href="class_light.html#a4b8ae7b1261037bf4648b36881982e33">00014</a>     <span class="keywordtype">long</span> <a class="code" href="class_light.html#a4b8ae7b1261037bf4648b36881982e33">getYellowDuration</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_light.html#a5c41a52fc7c4d710eb87eb67d11e47d9">m_lYellowDuration</a>;}
<a name="l00015"></a><a class="code" href="class_light.html#a20498e25593c7fa464c2cecde4db4953">00015</a>     <span class="keywordtype">long</span> <a class="code" href="class_light.html#a20498e25593c7fa464c2cecde4db4953">getGreenDuration</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_light.html#a123c287ae6507c8fa898aaca3f775ecc">m_lGreenDuration</a>;}
<a name="l00016"></a><a class="code" href="class_light.html#a9a339fff1b62334f4c7364889747e4a2">00016</a>     <span class="keywordtype">long</span> <a class="code" href="class_light.html#a9a339fff1b62334f4c7364889747e4a2">getMaxDuration</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_light.html#a6969a9b6c651e26c2a1a0bfe6ff9e8dd">m_lMaxDuration</a>;}
<a name="l00017"></a>00017 
<a name="l00018"></a>00018     <span class="keywordtype">void</span> <a class="code" href="class_light.html#ac0232ef304f8989db30c3fa4c5853863">TurnOnRed</a>();
<a name="l00019"></a>00019     <span class="keywordtype">void</span> <a class="code" href="class_light.html#a80b552e6a360f0734aefbfd3dc817b32">TurnOffRed</a>();
<a name="l00020"></a>00020 
<a name="l00021"></a>00021     <span class="keywordtype">void</span> <a class="code" href="class_light.html#a8ca3fdbd2c5b9bf8b109bacb5345ca41">TurnOnYellow</a>();
<a name="l00022"></a>00022     <span class="keywordtype">void</span> <a class="code" href="class_light.html#a483c8d566de37761c6217a58f7753ef4">TurnOffYellow</a>();
<a name="l00023"></a>00023     
<a name="l00024"></a>00024     <span class="keywordtype">void</span> <a class="code" href="class_light.html#af35b9286a07f998cd8af09e2533a7aaf">TurnOnGreen</a>();
<a name="l00025"></a>00025     <span class="keywordtype">void</span> <a class="code" href="class_light.html#a81f0d0ea11d88de3bacf8fd963989e70">TurnOffGreen</a>();
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="keyword">private</span>:
<a name="l00028"></a><a class="code" href="class_light.html#a14e9185e36c62bb9cc5815d48bdaa94a">00028</a>     <span class="keywordtype">long</span> <a class="code" href="class_light.html#a14e9185e36c62bb9cc5815d48bdaa94a">m_lRedDuration</a>;
<a name="l00029"></a><a class="code" href="class_light.html#a5c41a52fc7c4d710eb87eb67d11e47d9">00029</a>     <span class="keywordtype">long</span> <a class="code" href="class_light.html#a5c41a52fc7c4d710eb87eb67d11e47d9">m_lYellowDuration</a>;
<a name="l00030"></a><a class="code" href="class_light.html#a123c287ae6507c8fa898aaca3f775ecc">00030</a>     <span class="keywordtype">long</span> <a class="code" href="class_light.html#a123c287ae6507c8fa898aaca3f775ecc">m_lGreenDuration</a>;
<a name="l00031"></a><a class="code" href="class_light.html#a6969a9b6c651e26c2a1a0bfe6ff9e8dd">00031</a>     <span class="keywordtype">long</span> <a class="code" href="class_light.html#a6969a9b6c651e26c2a1a0bfe6ff9e8dd">m_lMaxDuration</a>;
<a name="l00032"></a>00032 };
<a name="l00033"></a>00033 
<a name="l00034"></a>00034 <span class="preprocessor">#endif // TRAFFICLIGHT_H</span>
</pre></div></div>
</div>
﻿<div id="footer">
    <hr />
    <p>
        Copyright &copy; 2011 StateForge.</p>
    <hr />
</div>
</body> </html> 
